<p>
	<a href="<?php echo $this->url(array('module' => 'default','controller'=>'manage', 'action' => 'index'), 'default', true); ?>" class="ui-state-default ui-corner-all linkButton">Back to Accounts<span class="ui-icon ui-icon-triangle-1-w"></span></a>
	<a href="<?php echo $this->url(array('module' => 'default','controller'=>'manage', 'action' => 'add-subcalendar', 'gmailAcctId' => $this->gmailAcct['gmailAcctId']), 'default', true); ?>" class="ui-state-default ui-corner-all linkButton">Add Sub-Calendar<span class="ui-icon ui-icon-plusthick"></span></a>
</p>
<table id="tableSorter" class="list tableSorter">
        <thead>
            <tr class="ui-widget-header">
                <th>Sub-Calendar</th>
                <th>Actions</th>
            </tr>
    </thead>
    <tbody>
	<?php foreach($this->subCalendarList as $a) : ?>
    <tr>
        <td>
			<a title="View Weekly Schedule" href="<?php echo $this->url(array('module' => 'default','controller'=>'view', 'action' => 'index', 'sub'=> $a['gmailSubCalendarId'], 'd' => 7, 'gad' => $a['gmailAcctId']), 'default', true); ?>">        
				<?php echo $a['identifier']; ?>
			</a>
			
		</td>
			
        <td>
        	<?php if($a['identifier'] != 'default') {?>
        		<a title="Edit Subcalendar" href="<?php echo $this->url(array('module' => 'default','controller'=>'manage', 'action' => 'edit-subcalendar', 'subCalendarId'=> $a['subCalendarId']), 'default', true); ?>" class="ui-state-default ui-corner-all linkButtonNoText"><span class="ui-icon ui-icon-pencil"></span></a>
        		<a title="Remove Subcalendar" href="<?php echo $this->url(array('module' => 'default','controller'=>'manage', 'action' => 'remove-subcalendar', 'subCalendarId'=> $a['subCalendarId']), 'default', true); ?>" class="ui-state-default ui-corner-all linkButtonNoText"><span class="ui-icon ui-icon-minus"></span></a>
        	<?php } else { ?>
        		<span title="You cannot edit or remove the default calendar" class="ui-icon ui-icon-alert"></span>
        	<?php } ?>
        </td>
    </tr>
    <?php endforeach; ?>
</table>